package Login;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/getparameter")
public class GetParameterServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String username=req.getParameter("username");
        if(username==null)
        {
            System.out.println("username在键值对中吗，没有值");
        }
        String userpsssword= req.getParameter("userpassword");
        if(userpsssword==null)
        {
            System.out.println("userpassword在键值对中吗，没有值");
        }
        System.out.println("uaername:"+username+"  "+"userpassword:"+userpsssword);
        resp.getWriter().write("ok");
    }


}
